<template>
  <div class="container">
    <CategoryVue title="美食">
      <img
        slot="center"
        src="https://s3.ax1x.com/ 2021/01/16srJlq0.jpg"
        alt=""
      />
      <a slot="footer" href="https://baicu.com">百度一下</a>
    </CategoryVue>

    <CategoryVue title="游戏">
      <ul slot="center">
        <li v-for="(g, index) in games" :key="index">{{ g }}</li>
      </ul>
      <div slot="footer" class="foot">
        <a href="https://www.baidu.com">单机游戏</a>
        <a href="https://www.baidu.com">网络游戏</a>
      </div>
    </CategoryVue>
    <CategoryVue title="电影">
      <video
        slot="center"
        controls
        src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
      ></video>
      <template v-slot:footer>
        <!-- 
              或者
                  v-slot:footer
                      只能使用在template
                  slot="footer"
           -->
        <div class="foot">
          <a href="https://www.baidu.com">经典</a>
          <a href="https://www.baidu.com">热门</a>
          <a href="https://www.baidu.com">推荐</a>
        </div>
        <h4>欢迎前来观影</h4>
      </template>
    </CategoryVue>
  </div>
</template>

<script>
import CategoryVue from "./components/CategoryVue.vue";
export default {
  name: "App",
  components: { CategoryVue },
  data() {
    return {
      foods: ["火锅", "烤肉", "串串", "石斑鱼"],
      games: ["LOL", "CF", "PUBG", "王者荣耀"],
      films: [
        "《肖申克的救赎》",
        "《阿甘正传》",
        "《银河护卫队》",
        "《这个杀手不太冷静》",
      ],
    };
  },
};
</script>
<style>
.container,
.foot {
  display: flex;
  justify-content: space-around;
}
h4 {
  text-align: center;
}
</style>